#pragma once
#include <windows.h>
#include <string>
#include <algorithm>
#include "TVector.h"
#include "TList.h"
#include "TMap.h"
#include "TSet.h"
#include "TSingleton.h"

template <typename T, typename U>
T& type_cast(const U& u)
{
	return *((T*)(&u));
}

typedef std::string String;

#define DEFINE(Class) \
	public: \
	static Class* Class::CreateOjbect();

#define DECLARATION(Class) \
	Class* Class::CreateOjbect() \
	{\
		Class* pClass = new Class();\
		return pClass;\
	}

#define Safe_Delete( p ) \
	if( p ) \
	{\
		delete p;\
		p = NULL;\
	}

#define Safe_Release( p ) \
	if( p ) \
	{\
		p->Release();\
		p = NULL;\
	}
